<template>
	<view class="page">
		<view class="item">
			<view class="top">
				<view class="txt">
					客户名称
				</view>
				<view class="I">
					*
				</view>
			</view>
			<view class="bottom">
				<view class="centent">
					<u-input v-model="form.companyName" placeholder="请输入客户名称" />
				</view>
			</view>
		</view>
		<view class="item">
			<view class="top">
				<view class="txt">
					客户联系人
				</view>
				<view class="I">
					*
				</view>
			</view>
			<view class="bottom">
				<view class="centent">
					<u-input v-model="form.companyPerson" placeholder="请输入名称" />
				</view>
			</view>
		</view>
		<view class="item">
			<view class="top">
				<view class="txt">
					联系电话
				</view>
				<view class="I">
					*
				</view>
			</view>
			<view class="bottom">
				<view class="centent">
					<u-input v-model="form.companyMobile" placeholder="请输入联系电话" />
				</view>
			</view>
		</view>
		<!-- <view class="item">
			<view class="top">
				<view class="txt">
					户名
				</view>
				
			</view>
			<view class="bottom">
				<view class="centent">
					<u-input v-model="form.houseName" placeholder="请输入户名" />
				</view>
			</view>
		</view> -->
		<view class="item">
			<view class="top">
				<view class="txt">
					用户户号
				</view>
				
			</view>
			<view class="bottom">
				<view class="centent">
					<u-input v-model="form.houseNum" placeholder="请输入户号" />
				</view>
			</view>
		</view>
		<view class="item">
			<view class="top">
				<view class="txt">
					预估电量
				</view>
				
			</view>
			<view class="bottom">
				<view class="centent">
					<u-input v-model="form.electricityNum" placeholder="请输入电量" />
				</view>
			</view>
		</view>

		<view class="item">
			<view class="top">
				<view class="txt">
					所在地
				</view>
				<view class="I">
					*
				</view>
			</view>
			<view class="bottom">
				<view class="centent">
					<u-input v-model="form.companyAddress" placeholder="请输入所在地址" />
				</view>
			</view>
		</view>
		
		<!-- <view class="item">
			<view class="top">
				<view class="txt">
					负责人姓名
				</view>
				<view class="I">
					*
				</view>
			</view>
			<view class="bottom">
				<view class="centent">
					<u-input v-model="form.directorName" placeholder="请输入负责人姓名" />
				</view>
			</view>
		</view>
		
		<view class="item">
			<view class="top">
				<view class="txt">
					负责人电话
				</view>
				<view class="I">
					*
				</view>
			</view>
			<view class="bottom">
				<view class="centent">
					<u-input v-model="form.directorMobile" placeholder="请输入负责人电话" />
				</view>
			</view>
		</view> -->
		<view class="submitBox">
			<view class="submit" @click="submit">
				确认新增
			</view>
		</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				form:{
					type:1
				}
			}
		},
		onLoad() {
			
		},
		onShow() {
			
		},
		methods:{
			submit(){
				this.$axios.request(this.$api.saveCustomHelp,"POST",this.form).then((val) => {
					uni.$emit('reloadData', val)
					this.$nextTick(() => {
						uni.navigateBack()
					})
				})
			}
		}
	}
</script>

<style>
	.page {
		width: 100%;
		height: 100vh;
		overflow-y: auto;
		background-color: #f9f9f9;
	}

	.item {
		display: flex;
		justify-content: space-between;
		align-items: center;
		width: 750rpx;
		background-color: #FFFFFF;
		margin-top: 16rpx;
		overflow: hidden;
	}

	.bottom{
		display: flex;
		justify-content: flex-start;
		align-items: center;
		padding: 0 32rpx;
		width: 80%;
	}
	.top {
		display: flex;
		justify-content: flex-start;
		align-items: center;
		padding: 0 32rpx;
	}

	.top {
		width: 370rpx;
	}

	.bottom {
	}

	.txt,
	.I {
		height: 40rpx;
		font-size: 32rpx;
		font-family: "PingFang SC";
		font-weight: 600;
		line-height: 40rpx;
		color: #333333;
	}

	.I {
		color: #F35B47;
		margin-left: 10rpx;
		line-height: 54rpx;
	}
	.submitBox {
		display: flex;
		justify-content: center;
		align-items: center;
		width: 100%;
		height: 96rpx;
		padding: 0 32rpx;
		background-color: #FFFFFF;
	}
	.submit {
		width: 686rpx;
		height: 64rpx;
		border-radius: 4rpx;
		background-color: #2E6ADF;
		font-size: 32rpx;
		font-family: "PingFang SC";
		font-weight: 400;
		line-height: 64rpx;
		text-align: center;
		color: #FFFFFF;
	}
	.put {
		width: 646rpx;
		height: 240rpx;
		border: 1rpx solid #E1E1E1;
		margin: 12rpx auto 0;
		padding:  20rpx;
	}
</style>
